package com.mall.product.controller;

import com.mall.common.domain.MallProduct;
import com.mall.common.domain.MallProductType;
import com.mall.common.domain.request.MallProductRequest;
import com.mall.common.result.Result;
import com.mall.product.service.ProductInfoService;
import com.mall.product.service.ProductTypeService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author wangy
 * @version 1.0
 * @description: TODO 商品信息控制层
 */
@RestController
public class ProductTypeController {
    @Resource
    private ProductTypeService productTypeService;

    /**
     * 分类列表
     *
     * @return Result<List < MallProductType>>
     */
    @PostMapping("productTypeAll")
    public Result<List<MallProductType>> productTypeAll() {
        List<MallProductType> mallProducts = productTypeService.productTypeAll();
        return Result.success(mallProducts);
    }

}
